﻿using DevExpress.XtraBars;
using Marmat.Foundation;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Marmat.Template.WinForm
{
    partial class MainForm
    {

        /// <summary>
        /// 获取主窗体已打开的窗体集合。
        /// </summary>
        public System.Windows.Forms.Form[] Forms => this.tabPanelControl1.Forms;

        /// <summary>
        /// 获取或设置主窗体显示的用户昵称
        /// </summary>
        public string NickName
        {
            get => nickName;
            set
            {
                nickName = value;
                barStaticItem1.Caption = "当前用户：" + nickName;
            }
        }
        private string nickName;

        /// <summary>
        /// 获取或设置主窗体显示的公司名称
        /// </summary>
        public new string CompanyName { get => companyName.Caption; set => companyName.Caption = value; }

        /// <summary>
        /// 获取或设置是否显示皮肤按钮。
        /// </summary>
        public bool ShowSkinButton
        {
            get => this.showSkinButton;
            set
            {
                this.showSkinButton = value;
                if (value) this.skinBarSubItem1.Visibility = BarItemVisibility.Always;
                else this.skinBarSubItem1.Visibility = BarItemVisibility.Never;
            }
        }
        private bool showSkinButton = true;
    }
}
